package com.demo.service;


import java.util.List;

import com.demo.entity.dto.SessionUserLoginDto;
import com.demo.entity.po.SysAccount;

import com.demo.entity.query.SysAccountQuery;

import com.demo.entity.vo.PaginationResultVO;


public interface SysAccountService{

	/**
	 * 根据条件查询列表
	 */
	List<SysAccount> findListByParam(SysAccountQuery query);

	/**
	 * 根据条件查询数量
	 */
	Integer findCountByParam(SysAccountQuery query);

	/**
	 * 分页查询
	 */
	PaginationResultVO<SysAccount> findListByPage(SysAccountQuery  query);

	/**
	 * 新增
	 */
	Integer  add(SysAccount bean);

	/**
	 * 批量新增
	 */
	Integer  addBatch(List<SysAccount> listBean);

	/**
	 * 批量新增或者修改
	 */
	Integer  addOrUpdateBatch(List<SysAccount> listBean);


	/**
	 * 根据UserId查询
	 */
	SysAccount getSysAccountByUserId(Integer userId);

	/**
	 * 根据UserId更新
	 */
	Integer updateSysAccountByUserId(SysAccount bean, Integer userId);

	/**
	 * 根据UserId删除
	 */
	Integer deleteSysAccountByUserId(Integer userId);


	/**
	 * 根据Phone查询
	 */
	SysAccount getSysAccountByPhone(String phone);

	/**
	 * 根据Phone更新
	 */
	Integer updateSysAccountByPhone(SysAccount bean, String phone);

	/**
	 * 根据Phone删除
	 */
	Integer deleteSysAccountByPhone(String phone);

	SessionUserLoginDto login(String phone, String password);

	void saveSysAccount(SysAccount sysAccount);

	void updateSysAccount(SysAccount sysAccount,Integer userId);



	void register(String phone, String password);
}